package com.zline.foodraise.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by heshantao on 15/11/16.
 * 活动公告实体
 */
public class NoticeBean implements Parcelable {
    //简短介绍
    String briefIntroduction;
    //内容
    String content;
    //创建时间戳
    long createTimeStamp;
    //图片服务器地址
    String image;
    //活动、公告Id
    long noticeId;
    //消息类型  0:公告  1：活动
    int noticeType;
    //标题
    String title;

    public NoticeBean() {
    }

    public NoticeBean(String briefIntroduction, String content, long createTimeStamp,
                      String image, long noticeId, int noticeType, String title) {
        this.briefIntroduction = briefIntroduction;
        this.content = content;
        this.createTimeStamp = createTimeStamp;
        this.image = image;
        this.noticeId = noticeId;
        this.noticeType = noticeType;
        this.title = title;
    }

    public String getBriefIntroduction() {
        return briefIntroduction;
    }

    public void setBriefIntroduction(String briefIntroduction) {
        this.briefIntroduction = briefIntroduction;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public long getCreateTimeStamp() {
        return createTimeStamp;
    }

    public void setCreateTimeStamp(long createTimeStamp) {
        this.createTimeStamp = createTimeStamp;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public long getNoticeId() {
        return noticeId;
    }

    public void setNoticeId(long noticeId) {
        this.noticeId = noticeId;
    }

    public int getNoticeType() {
        return noticeType;
    }

    public void setNoticeType(int noticeType) {
        this.noticeType = noticeType;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.briefIntroduction);
        dest.writeString(this.content);
        dest.writeLong(this.createTimeStamp);
        dest.writeString(this.image);
        dest.writeLong(this.noticeId);
        dest.writeInt(this.noticeType);
        dest.writeString(this.title);
    }

    protected NoticeBean(Parcel in) {
        this.briefIntroduction = in.readString();
        this.content = in.readString();
        this.createTimeStamp = in.readLong();
        this.image = in.readString();
        this.noticeId = in.readLong();
        this.noticeType = in.readInt();
        this.title = in.readString();
    }

    public static final Parcelable.Creator<NoticeBean> CREATOR = new Parcelable.Creator<NoticeBean>() {
        public NoticeBean createFromParcel(Parcel source) {
            return new NoticeBean(source);
        }

        public NoticeBean[] newArray(int size) {
            return new NoticeBean[size];
        }
    };
}
